export enum SocketEventType {
  shapechangepending = 'shapechangepending',
  taskupdated = 'taskupdated',
  taskmonitor = 'taskmonitor',
  geometryRender = 'geometryRender',
  geometryChanged = 'geometryChanged',
  meshChanged = 'meshChanged',
  meshFailed = 'meshFailed',
  meshDeleted = 'meshDeleted',
  databaseChanged = 'databaseChanged',
  modelBrowserChanged = 'modelBrowserChanged',
  geometryDeleted = 'geometryDeleted',
}

export interface ISocketEvent<T = any> {
  event: SocketEventType;
  uuid?: string; // uuid
  data?: T;
  autoFit?: boolean; // 一般在导入step/打开文档后，返回渲染数据该值为true
}

export type SocketEventHandler = (event: ISocketEvent) => void;

export type SocketStatusListener = (open: boolean) => void;
